home *** CD-ROM | disk | FTP | other *** search
/ Amiga Game-Power / Amiga Game-Power.iso / power games ii / tetrix / fileselect / fileselect.s < prev    next >
Text File  |  1994-05-20  |  36KB  |  1,470 lines

  1. ***************************************************************************
  2. *     File Select V1.0           by   Fabrice Lienhardt          *
  3. *                         7 rue de Leicester          *
  4. *                         67000 Strasbourg (France)      *
  5. *   (This is public domain)                          *
  6. *   100% assembler - Written with Devpac Assembler              *
  7. ***************************************************************************
  8.  
  9.     incdir    ":include/"        :Open libraries
  10.     include    exec/exec_lib.i
  11.     include    intuition/intuition.i
  12.     include    intuition/intuition_lib.i
  13.     include    graphics/graphics_lib.i
  14.     include libraries/dos_lib.i
  15.     include libraries/dos.i
  16.  
  17.     lea    intname,a1
  18.     CALLEXEC OldOpenLibrary        :Open Intuition
  19.     tst.l    d0
  20.     beq    int_error        :quit if error
  21.     move.l    d0,_IntuitionBase
  22.  
  23.     lea    grafname,a1
  24.     CALLEXEC OldOpenLibrary        :Open Graphics
  25.     tst.l    d0
  26.     beq    gfx_error        :quit if error
  27.     move.l    d0,_GfxBase
  28.  
  29.     lea.l    dosname,a1
  30.     CALLEXEC OldOpenLibrary        :Open Dos
  31.     tst.l    d0
  32.     beq    dos_error        :quit if error
  33.     move.l    d0,_DOSBase
  34.  
  35. ***************************************************************************
  36.  
  37.     move.l #$10000,d1        :if possible FASTRAM
  38.     move.l #1734,d0            :ram with 34*51 characters
  39.     CALLEXEC AllocMem        :allocate memory for buffer (oblig.!)
  40.     tst.l d0
  41.     beq mem_error            :if error, quit
  42.     move.l d0,filebuffer
  43.  
  44.     lea.l    NewScreen,a0
  45.     CALLINT    OpenScreen        :Open Screen for my example
  46.     move.l    d0,screenhd
  47.  
  48. *                    :Prepare text in filewindow
  49.     lea.l gadload,a6        :or gadsave or gaddelete !!!!
  50.     move.l a6,gad78text
  51.     lea.l titleload,a6        :or titlesave or titledelete !!!
  52.     move.l a6,filetitle
  53.     bsr fileselect            :and call routine fileselect
  54.  
  55.     nop                :-----------------------------------
  56.     nop                :Results:
  57.     nop                : address of filename in register a0
  58.     nop                :         or a0 = 0 if cancel
  59.     nop                :-----------------------------------
  60.     nop                :etc etc etc....(your routines to
  61.     nop                : load or save or delete a file).
  62.     nop
  63.     nop                :for my example, print the filename
  64.     nop                :in CLI window    
  65.     move.l a0,d6    
  66.      CALLDOS Output
  67.     move.l d0,d1
  68.     move.l d0,d7
  69.     move.l #fileselmsg,d2
  70.     move.l #60,d3
  71.     CALLDOS Write
  72.     tst.l d6
  73.     beq nofileselected
  74.     move.l d7,d1
  75.     move.l #fisel,d2
  76.     move.l #17,d3
  77.     CALLDOS Write
  78.     move.l d6,a5
  79.     moveq #0,d3
  80. nbchar:
  81.     addq #1,d3
  82.     tst.b (a5)+
  83.     bne nbchar
  84.     addq #1,d3
  85.     subq #1,a5
  86.     move.b #$0d,(a5)+
  87.     move.b #$0a,(a5)
  88.     move.l d7,d1
  89.     move.l #filename,d2
  90.     CALLDOS Write
  91.     bra the_end            :close all and return to CLI
  92.  
  93. nofileselected:
  94.     move.l d7,d1
  95.     move.l #nofilesel,d2
  96.     move.l #18,d3
  97.     CALLDOS Write
  98.     
  99. the_end:
  100.     move.l    screenhd,a0
  101.     CALLINT CloseScreen        :Close Screen
  102. scr_error:
  103.     move.l filebuffer,a1
  104.     move.l #1734,d0
  105.     CALLEXEC FreeMem        :free memory for file buffer
  106. mem_error:
  107.     move.l _DOSBase,a1
  108.     CALLEXEC CloseLibrary        :Close dos library
  109. dos_error:
  110.     move.l    _GfxBase,a1
  111.     CALLEXEC CloseLibrary        :Close gfx library
  112. gfx_error:
  113.     move.l    _IntuitionBase,a1
  114.     CALLEXEC CloseLibrary        :Close int library
  115. int_error:
  116.     rts
  117.  
  118. ***************************************************************************
  119. * Sub-routine to select a filename in a directory -------------------------
  120. ***************************************************************************
  121.  
  122. * Sorry but I am to lazy to traduce all comments in English !!!
  123. * It were be traduced in version 1.1 !!!
  124.     
  125. fileselect:        
  126.     lea.l filewindow,a0    
  127.     CALLINT    OpenWindow        :Open window Load-Save-Delete
  128.     move.l d0,filewinhd
  129.  
  130.     move.l d0,a0
  131.     move.l wd_RPort(a0),fileRPort    :Determination RastPort
  132.     move.l wd_UserPort(a0),fileUPort:Determination UserPort
  133.  
  134. filedrive:
  135.     bsr filerefreshfile        :effacer fichier
  136.     move.b #0,flaglock        :lock encore ferme
  137.     move.l #filedrawer,d1        :adresse du drawer
  138.     move.l #$fffffffe,d2        :mode lecture
  139.     CALLDOS Lock            :Lock
  140.     tst.l d0
  141.     beq lockerr            :si erreur afficher
  142.     move.b #1,flaglock        :lock ouvert
  143.     move.l d0,lockhd
  144.  
  145.     move.l lockhd,d1
  146.     move.l #fileinfo,d2        :buffer = fileinfo
  147.     CALLDOS Examine            :Examiner titre disquette
  148.     tst.l d0            :erreur?
  149.     beq lockerr            :si oui determiner pourquoi
  150.  
  151.     bra filelecture
  152.  
  153. lockerr:
  154.     bsr fileunlock            :sinon refermer lock car erreur
  155.     bsr fileinitmover        :initialiser mover
  156.     lea.l fileafferr1,a0
  157.     move.b #1,affstatus
  158.     bsr fileaffstatus        :'No disk in drive'
  159.     move.b #1,flaglect
  160.     move.l screenhd,a0
  161.     CALLINT ScreenToFront        :revenir ecran apres erreur
  162.     bra fileinitbcle
  163.  
  164. filelecture:
  165.     bsr fileinitmover        :initialiser prop gadget
  166.     move.b #0,flaglect        :lecture possible = nouv. disk
  167.  
  168. fileinitbcle:
  169.     move.b #0,d
  170.     move.b #0,f
  171. filebigbcle:
  172.     move.l fileUPort,a0
  173.     CALLEXEC GetMsg            :lire si message dans port
  174.     tst.l d0
  175.     beq filenomsg            :si non continuer
  176.     move.l d0,a1
  177.     move.l im_Class(a1),d4
  178.     move.l im_Code(a1),d5
  179.     move.l im_IAddress(a1),a4
  180.     CALLEXEC ReplyMsg
  181.     bra filelectgadget
  182.  
  183. filenomsg:
  184.     tst.b flaglect            :lecture directory en cours?
  185.     bne filenolect
  186.  
  187.     move.l lockhd,d1
  188.     move.l #fileinfo+2,d2
  189.     CALLDOS ExNext            :si oui continuer a lire
  190.     tst.l d0
  191.     bne filenoend            :si terminer alors fileend
  192.     bsr fileclrstatus
  193.     move.b d,d0
  194.     add.b f,d0
  195.     tst.b d0
  196.     beq filezero            :si fin et pas de fichiers?
  197.     bra fileend
  198. filezero:
  199.     move.b #1,flaglect        :alors arreter lecture 
  200.     bsr fileunlock            :unlock si possible
  201.     bra filebigbcle
  202.  
  203. filenoend:
  204.     lea.l fileinfo+8,a0        :Tri de la memoire buffer
  205.     move.b (a0),d7            :d7,premiere lettre du titre
  206.     cmp.b #$5b,d7
  207.     bcc filenomajuscule        :test si majuscule pour tri
  208.     add.b #$20,d7            :egalite majuscule-minuscule
  209. filenomajuscule:
  210.     tst.l fileinfo+4
  211.     bpl filedir            :si positif alors directory
  212.     move.b #1,affstatus
  213.     lea.l fileinfo+8,a0
  214.     bsr fileaffstatus        :afficher titre
  215.     add.b #1,f            :sinon incrementer nb fichiers
  216.     moveq #1,d6            :et preparer couleur
  217.     moveq #1,d1
  218.     add.b d,d1            :debut des fichiers = d+1
  219.     move.b f,d2
  220.     add.b d,d2            :fin fichiers = f+d
  221.     bra filesavename        :puis comparer et memoriser
  222. filedir:
  223.     move.b #3,affstatus
  224.     lea.l fileinfo+8,a0
  225.     bsr fileaffstatus        :afficher titre
  226.     add.b #1,d            :si dir alors incrementer nb dir
  227.     moveq #3,d6            :et preparer couleur
  228.     moveq #1,d1            :debut des fichiers = 1
  229.     move.b d,d2            :fin fichiers = d
  230. filesavename:
  231.     cmp.b d1,d2            :dernier fichier atteint?
  232.     beq filemove            :si oui alors deplacer buffer
  233.     move.l d1,d3
  234.     subq #1,d3
  235.     mulu #34,d3            :offset nom (d1) dans buffer
  236.     move.l filebuffer,a0
  237.     add.l d3,a0
  238.     move.b (a0),d3            :d3 = premiere lettre nom (d1)
  239.     cmp.b #$5b,d3
  240.     bcc filenomajuscule2        :test si majuscule pour tri
  241.     add.b #$20,d3            :egalite majuscule-minuscule
  242. filenomajuscule2:
  243.     cmp.b d7,d3
  244.     bcs filenolower            :pas inferieur alors continuer
  245.     bra filemove            :sinon deplacer buffer
  246. filenolower:
  247.     addq #1,d1
  248.     bra filesavename        :passer a nom suivant et boucler
  249. filemove:
  250.     moveq #1,d3
  251.     add.b d,d3            :transfert des titres dans buffer
  252.     add.b f,d3
  253.     mulu #34,d3
  254.     move.l filebuffer,a0
  255.     add.l a0,d3
  256.     move.l d3,a3            :a3 = (f+d+1)*34 ad fin transfert
  257.     sub.l #34,d3
  258.     move.l d3,a2            :a2 = a3-34 adresse debut transfert
  259.     moveq #1,d3
  260.     add.b f,d3
  261.     add.b d,d3
  262.     sub.b d1,d3            :d3 = (f+d+1-d1) nb de transferts
  263. filetransfert:
  264.     moveq #8,d4
  265. filetrans:
  266.     move.l -(a2),-(a3)        :transfert 32 octets
  267.     subq #1,d4
  268.     bne filetrans
  269.     move.w -(a2),-(a3)        :+2 octets
  270.     subq #1,d3
  271.     bne filetransfert
  272.     clr.l d3            :preparer sauvegarde nom
  273.     move.l d1,d3
  274.     subq #1,d3
  275.     mulu #34,d3
  276.     lea.l fileinfo+8,a0        :adresse debut source
  277.     move.l filebuffer,a1
  278.     add.l d3,a1            :adresse debut destination
  279.     moveq #8,d4
  280. filecopyname:
  281.     move.l (a0)+,(a1)+        :recopie du nom titre
  282.     subq #1,d4
  283.     bne filecopyname
  284.     move.b #0,(a1)+            :placer fin nom 
  285.     move.b d6,(a1)            :placer couleur 
  286.  
  287.     move.b f,d0
  288.     add.b d,d0
  289.     cmp.b #50,d0
  290.     bne filebigbcle
  291.     lea.l fileafferr3,a0        :si > 50 titres arreter et
  292.     move.b #1,affstatus        :'Directory truncated'
  293.     bsr fileaffstatus
  294. fileend:
  295.     move.b #1,flaglect
  296.     bsr fileunlock            :plus de lectures a effectuer
  297.     lea.l gadget79,a0
  298.     move.l filewinhd,a1
  299.     move.l #0,a2
  300.     moveq #5,d0
  301.     moveq #0,d1            :mettre tous les parametres
  302.     moveq #0,d2
  303.     moveq #0,d3
  304.     clr.l d5
  305.     move.b f,d5
  306.     add.b d,d5
  307.     cmp.b #11,d5
  308.     bcs filenogreater        :preparer prop gadget
  309.     move.l #$ffff,d4
  310.     divu d5,d4
  311.     and.l #$0000ffff,d4
  312.     mulu #10,d4            :taille mover = $ffff*10/(f+d)
  313.     bra fileprop
  314. filenogreater:
  315.     move.l #$ffff,d4
  316. fileprop:
  317.     CALLINT ModifyProp        :modifier le prop gadget
  318.     move.b #1,fileaffstart        :--affichage a partir du 1er titre--
  319.     clr.l d2            :affichage des noms de fichier
  320.     move.b f,d2
  321.     add.b d,d2            :calculer nombre de fichiers presents
  322.     cmp.b #11,d2
  323.     bcs minusdix
  324.     moveq #10,d2            :si > 10 alors forcer a 10
  325. minusdix:
  326.     move.l fileRPort,a0
  327.     lea.l affnames,a1        :initialiser parametres
  328.     moveq #0,d0
  329.     moveq #0,d1
  330.     move.l filebuffer,a3        :afficher 10 premiers titres
  331. filenamesbcle:
  332.     moveq #8,d0    
  333.     lea.l names,a2
  334. filecopynames:
  335.     move.l (a3)+,(a2)+        :32 caracteres a copier
  336.     subq #1,d0
  337.     bne filecopynames
  338.     move.w (a3),(a2)+        :+2 caracteres
  339.     addq #1,a3
  340.     move.b (a3)+,affnames        :placer couleur pour dir ou file
  341.     movem.l a0-a3/d0-d2,-(sp)    :sauver parametres
  342.     CALLINT PrintIText        :afficher nom du fichier
  343.     movem.l (sp)+,a0-a3/d0-d2    :recuperer parametres
  344.     addq #8,d1
  345.     subq #1,d2
  346.     bne filenamesbcle
  347.     bra filebigbcle
  348.  
  349. filenolect:
  350.     clr.l d0
  351.     move.b f,d0
  352.     add.b d,d0
  353.     cmp.b #11,d0            :si <10 reboucler
  354.     bcs filebigbcle            :calcul position mover
  355.     sub.b #10,d0
  356.     mulu filemoverpos,d0
  357.     divu #$ffff,d0
  358.     and.l #$0000ffff,d0
  359.     addq #1,d0            :d0 = 1er titre a  afficher
  360.     cmp.b fileaffstart,d0
  361.     beq filebigbcle            :si pas changements, pas scroller
  362.     bcc filescrolld
  363.     bsr filescrolldown        :sinon scroller vers le bas 
  364.     bra filebigbcle
  365. filescrolld:
  366.     bsr filescrollup        :ou vers le haut
  367.     bra filebigbcle
  368.  
  369. filelectgadget:
  370.     moveq #0,d0
  371.     move.w gg_GadgetID(a4),d0    :d0 = ID du gadget
  372.     cmp.w #61,d0
  373.     beq filedf0            :Lecture de tous les gadgets
  374.     cmp.w #62,d0
  375.     beq filedf1
  376.     cmp.w #63,d0
  377.     beq filedh0
  378.     cmp.w #64,d0
  379.     beq fileparent
  380.     cmp.w #65,d0
  381.     beq filedrawers
  382.     cmp.w #66,d0
  383.     beq filetitre
  384.     cmp.w #67,d0
  385.     beq filetitre
  386.     cmp.w #68,d0
  387.     beq filetitre
  388.     cmp.w #69,d0
  389.     beq filetitre
  390.     cmp.w #70,d0
  391.     beq filetitre
  392.     cmp.w #71,d0
  393.     beq filetitre
  394.     cmp.w #72,d0
  395.     beq filetitre
  396.     cmp.w #73,d0
  397.     beq filetitre
  398.     cmp.w #74,d0
  399.     beq filetitre
  400.     cmp.w #75,d0
  401.     beq filetitre
  402.     cmp.w #76,d0
  403.     beq filestring
  404.     cmp.w #77,d0
  405.     beq filecancel
  406.     cmp.w #78,d0
  407.     beq fileload
  408.     and.l #$10000,d4
  409.     beq filediskremoved
  410.     and.l #$8000,d4
  411.     beq filediskinsert
  412.     bra filebigbcle
  413.  
  414. filedf0:
  415.     bsr filereinit            :Unlock-clr titres-no oldname
  416.     bsr fileclrstatus
  417.     lea.l filedrawer,a0
  418.     move.l #'df0:',(a0)+        :recommencer avec df0:
  419.     move.b #$00,(a0)
  420.     bsr filerefresh
  421.     bra filedrive    
  422. filedf1:
  423.     bsr filereinit            :Unlock-clr titres-no oldname
  424.     bsr fileclrstatus
  425.     lea.l filedrawer,a0
  426.     move.l #'df1:',(a0)+        :recommencer avec df1:
  427.     move.b #$00,(a0)
  428.     bsr filerefresh
  429.     bra filedrive    
  430. filedh0:
  431.     bsr filereinit            :Unlock-clr titres-no oldname
  432.     bsr fileclrstatus
  433.     lea.l filedrawer,a0
  434.     move.l #'dh0:',(a0)+        :recommencer avec dh0:
  435.     move.b #$00,(a0)
  436.     bsr filerefresh
  437.     bra filedrive    
  438.  
  439. filecancel:
  440.     bsr fileunlock            :unlock si necessaire
  441.     move.l filewinhd,a0
  442.     CALLINT CloseWindow        :Close fileselect Window
  443.     move.l #0,a0
  444.     rts                :puis quitter
  445.  
  446. fileload:
  447.     bsr fileunlock            :unlock si necessaire
  448.     lea.l filename,a0        :preparer a0
  449.     tst.b (a0)
  450.     beq filenoload             :si pas de nom alors erreur
  451.     move.l filewinhd,a0
  452.     CALLINT CloseWindow        :Close fileselect Window
  453.     lea.l filename,a0
  454.     rts
  455. filenoload:
  456.     lea.l fileafferr2,a0        :'no file specified'
  457.     move.b #1,affstatus        :couleurs jaune
  458.     bsr fileaffstatus        :afficher
  459.     bra filebigbcle
  460.  
  461. fileparent:
  462.     lea.l filedrawer,a0
  463.     moveq #38,d0
  464. fileparentex:
  465.     cmp.b #'/',(a0,d0)        :recherche d'un slash a partir de fin
  466.     beq fileparentexist
  467.     cmp.b #':',(a0,d0)
  468.     beq fileparentexist2
  469.     subq #1,d0            :si pas trouve passer a suite
  470.     bne fileparentex        :et reboucler
  471.     bra filebigbcle            :si inexistant ne rien faire
  472. fileparentexist:
  473.     move.b #0,(a0,d0)        :si trouve tronquer
  474.     bra fileparexit
  475. fileparentexist2:
  476.     addq #1,d0
  477.     tst.b (a0,d0)
  478.     beq filebigbcle            :si juste dfx: alors rien a faire
  479.     move.b #0,(a0,d0)        :ne pas effacer :
  480. fileparexit:
  481.     bsr filereinit            :Unlock-clr titres-no oldname
  482.     bsr fileclrstatus
  483.     bsr filerefresh
  484.     bra filedrive    
  485.      
  486. filestring:
  487.     bra fileload
  488.  
  489. filetitre:
  490.     add.b fileaffstart,d0        :d0 = position - 66(gadget) -1 (off)
  491.     sub.b #67,d0            :d0 de 0 a x
  492.     move.b f,d1
  493.     add.b d,d1
  494.     cmp.b d1,d0
  495.     bcc filebigbcle            :si champ non defini alors erreur
  496.     mulu #34,d0
  497.     move.l filebuffer,a0
  498.     add.l d0,a0            :adresse du buffer fichier
  499.     move.b 33(a0),d7
  500.     cmp.b #03,d7            :d7 = couleur
  501.     beq fileseldir            :directory
  502.     lea.l filename,a1        :sinon fichier
  503.     move.l a0,a2
  504. filetittst:
  505.     move.b (a1)+,d5
  506.     cmp.b (a2),d5            :comparaison si deja recopie
  507.     bne filefirst            :si non recopier titre dans string 
  508.     tst.b (a2)+
  509.     bne filetittst
  510.     bra fileload            :si oui alors deja recopie et load
  511. filefirst:
  512.     moveq #8,d0
  513.     lea.l filename,a1
  514. filecopyfile:
  515.     move.l (a0)+,(a1)+        :recopie du nom fichier dans string
  516.     subq #1,d0
  517.     bne filecopyfile
  518.     bsr filerefreshfile
  519.     bra filebigbcle
  520. fileseldir:
  521.     moveq #7,d0            :cas ou titre directory
  522.     lea.l filedrawer,a1
  523. filetstend:
  524.     tst.b (a1)+            :recherche fin du drawer 
  525.     bne filetstend
  526.     subq #2,a1
  527.     cmp.b #':',(a1)
  528.     beq filenoslash
  529.     addq #1,a1
  530.     move.b #'/',(a1)+        :slash de separation pour sous-dir
  531. filenewdrawer:
  532.     move.b (a0),(a1)+        :copie du nouveau drawer
  533.     tst.b (a0)
  534.     beq filenewend
  535.     addq #1,a0
  536.     bra filenewdrawer
  537. filenoslash:
  538.     addq #1,a1
  539.     bra filenewdrawer
  540. filenewend:
  541.     bsr filereinit            :Unlock-clr titres-no oldname
  542.     bsr fileclrstatus
  543.     bsr filerefresh
  544.     bra filedrive    
  545.     
  546. filedrawers:
  547.     bsr filereinit            :Unlock-clr titres-no oldname
  548.     bsr fileclrstatus
  549.     bra filedrive            :accepter nouveau drawer et lock
  550.  
  551. filediskremoved:
  552.     nop
  553. filediskinsert:
  554.     nop
  555.     bra filebigbcle
  556.  
  557. ****************************************************************************
  558. * Sous programmes file -----------------------------------------------------
  559. ****************************************************************************
  560.  
  561.  
  562. filerefresh:
  563.     move.l #0,gadget65
  564.     lea.l gadget65,a0
  565.     move.l filewinhd,a1
  566.     move.l #0,a2
  567.     CALLINT RefreshGadgets        :rafraichir drawer uniquement
  568.     lea.l gadget66,a0
  569.     move.l a0,gadget65
  570.     rts
  571.  
  572. filerefreshfile:
  573.     move.l #0,gadget76
  574.     lea.l gadget76,a0
  575.     move.l filewinhd,a1
  576.     move.l #0,a2
  577.     CALLINT RefreshGadgets        :rafraichir file uniquement
  578.     lea.l gadget77,a0
  579.     move.l a0,gadget76
  580.     rts
  581.  
  582. fileunlock:
  583.     tst.b flaglock            :unlock a effectuer?
  584.     beq filenounlock        :sinon revenir
  585.     move.b #0,flaglock        :si oui remettre flag a 0
  586.     move.l lockhd,d1
  587.     CALLDOS UnLock            :et unlock
  588. filenounlock:
  589.     rts
  590.  
  591. filereinit:
  592.     bsr fileunlock            :refermer lock avant new drawer
  593.     move.l fileRPort,a1
  594.     moveq #0,d0
  595.     CALLGRAF SetAPen        :couleur remplissage
  596.     move.l fileRPort,a1
  597.     moveq #12,d0
  598.     move.l #51,d1
  599.     move.l #267,d2
  600.     move.l #130,d3
  601.     CALLGRAF RectFill        :efface zone titres
  602.     bsr fileinitmover        :reinitialiser    mover
  603.     move.b #$0,filename        :detruire ancien nom fichier
  604.     rts
  605.  
  606. fileclrstatus:
  607.     move.l fileRPort,a1
  608.     moveq #0,d0
  609.     CALLGRAF SetAPen        :couleur remplissage
  610.     move.l fileRPort,a1
  611.     moveq #65,d0
  612.     move.l #172,d1
  613.     move.l #291,d2
  614.     move.l #180,d3
  615.     CALLGRAF RectFill        :efface zone Status
  616.     rts
  617.  
  618. fileaffstatus:
  619.     move.l a0,-(sp)
  620.     bsr fileclrstatus        :dabord effacer status
  621.     move.l (sp)+,a0
  622.     lea.l affstat,a1        :copie de texte pour message erreur
  623.     moveq #8,d0
  624. filecopyerr:
  625.     move.l (a0)+,(a1)+        :32 caracteres a copier
  626.     subq #1,d0
  627.     bne filecopyerr
  628.     move.l fileRPort,a0
  629.     lea.l affstatus,a1
  630.     moveq #0,d0
  631.     moveq #0,d1
  632.     CALLINT PrintIText        :afficher nom fichier ou erreur 
  633.     rts
  634.     
  635. fileinitmover:
  636.     lea.l gadget79,a0
  637.     move.l filewinhd,a1
  638.     move.l #0,a2
  639.     moveq #5,d0
  640.     moveq #0,d1            :remettre tous les parametres org.
  641.     moveq #0,d2
  642.     moveq #0,d3
  643.     move.l #$ffff,d4
  644.     CALLINT ModifyProp        :modifier le prop gadget
  645.     rts
  646.  
  647. filescrolldown:
  648.     moveq #4,d0
  649. filewait2:
  650.     cmpi.b #1,$dff006
  651.     bne filewait2
  652.     move.l d0,-(sp)
  653.     move.l    fileRPort,a1        :preparer scrollraster
  654.     move.l     #0,d0
  655.     move.l    #-2,d1
  656.     move.l    #12,d2
  657.     move.l    #51,d3
  658.     move.l    #267,d4
  659.     move.l    #130,d5
  660.     CALLGRAF ScrollRaster        :scroller texte 1 ligne en bas
  661.     move.l (sp)+,d0
  662.     subq #1,d0
  663.     bne filewait2            :scroller 8 bits vers le bas
  664.     move.l filebuffer,a0
  665.     clr.l d0
  666.     sub.b #1,fileaffstart
  667.     move.b fileaffstart,d0
  668.     subq #1,d0
  669.     mulu #34,d0
  670.     add.l d0,a0            :a0 = adresse debut nouveau titre
  671.     lea.l affdown,a1        :copie de texte pour titre suivant
  672.     moveq #8,d0
  673. filecopyd:
  674.     move.l (a0)+,(a1)+        :32 caracteres a copier
  675.     subq #1,d0
  676.     bne filecopyd
  677.     move.b (a0)+,(a1)+        :copie du 0
  678.     move.b (a0),afftitd        :copie de la couleur
  679.     move.l fileRPort,a0
  680.     lea.l afftitd,a1
  681.     moveq #0,d0
  682.     moveq #0,d1
  683.     CALLINT PrintIText        :afficher nom fichier ou erreur 
  684.     rts
  685.  
  686. filescrollup:
  687.     moveq #4,d0
  688. filewait3:
  689.     cmpi.b    #1,$dff006    
  690.     bne.l    filewait3
  691.     move.l d0,-(sp)
  692.     move.l    fileRPort,a1        :preparer scrollraster
  693.     move.l     #0,d0
  694.     move.l    #2,d1
  695.     move.l    #12,d2
  696.     move.l    #51,d3
  697.     move.l    #267,d4
  698.     move.l    #130,d5
  699.     CALLGRAF ScrollRaster        :scroller texte 1 ligne en haut
  700.     move.l (sp)+,d0
  701.     subq #1,d0
  702.     bne filewait3            :scroller 8 bits vers le haut
  703.     move.l filebuffer,a0
  704.     clr.l d0
  705.     add.b #1,fileaffstart
  706.     move.b fileaffstart,d0
  707.     add.b #8,d0
  708.     mulu #34,d0
  709.     add.l d0,a0            :a0 = adresse debut nouveau titre
  710.     lea.l affup,a1            :copie de texte pour titre suivant
  711.     moveq #8,d0
  712. filecopyu:
  713.     move.l (a0)+,(a1)+        :32 caracteres a copier
  714.     subq #1,d0
  715.     bne filecopyu
  716.     move.b (a0)+,(a1)+        :copie du 0
  717.     move.b (a0),afftitu        :copie de la couleur
  718.     move.l fileRPort,a0
  719.     lea.l afftitu,a1
  720.     moveq #0,d0
  721.     moveq #0,d1
  722.     CALLINT PrintIText        :afficher nom fichier ou erreur 
  723.     rts
  724.  
  725. ****************************************************************************
  726. * Declaration des variables systeme et handles -----------------------------
  727. ****************************************************************************
  728.  
  729. _IntuitionBase    dc.l 0            :Bases des librairies
  730. _DOSBase    dc.l 0
  731. _GfxBase    dc.l 0
  732.  
  733. intname        INTNAME            :Nom des librairies
  734.         even
  735. grafname    GRAFNAME
  736.         even
  737. dosname        DOSNAME
  738.         even
  739.  
  740. filewinhd    dc.l 0
  741. filebuffer    dc.l 0
  742. lockhd        dc.l 0
  743.  
  744. fileRPort    dc.l 0
  745. fileUPort    dc.l 0
  746.  
  747.         cnop 0,4
  748. fileinfo    ds.l 260
  749.  
  750. f        dc.w 0
  751. d        dc.w 0
  752. fileaffstart    dc.w 0
  753. flaglect    dc.w 0
  754. flaglock    dc.w 0
  755.  
  756. filename    ds.b 34
  757. filedrawer    dc.b 'df0:'
  758.         ds.w 17
  759.  
  760. ****************************************************************************
  761. * Declaration des structures ecran et fenetres -----------------------------
  762. ****************************************************************************
  763.  
  764. NewScreen    dc.w    0,0        :Positions X et Y
  765.         dc.w    640,200        :largeur, hauteur
  766.         dc.w    2        :Nb de bitplanes
  767.         dc.b    2,1        :couleurs
  768.         dc.w    $8002        :viewmodes
  769.         dc.w    15        :type
  770.         dc.l    0        :font
  771.         dc.l    titrescreen    :title
  772.         dc.l    0        :gadgets
  773.         dc.l    0        :bitmap
  774. titrescreen     dc.b    'Fileselect V1.0  by  F.Lienhardt   1988',0
  775.         even
  776.  
  777. filewindow    dc.w    168        :Position X
  778.         dc.w    14        :Position Y
  779.         dc.w     304        :Largeur
  780.         dc.w     186        :Hauteur
  781.         dc.b     1,3        :Couleurs
  782.         dc.l     $18060        :IDCMP-flags
  783.         dc.l     $1000        :Type
  784.         dc.l     gadget61    :Pointeur gadget61
  785.         dc.l     0        :Checkmark
  786. filetitle    dc.l     0        :Nom fenetre
  787. screenhd    dc.l     0        :Affichage dans ecran
  788.         dc.l     0        :Pointeur Bitmaps
  789.         dc.w    0,0,0,0        :Dimensions max et min    
  790.         dc.w     15        :Screen-Type
  791.         even
  792.  
  793. ***************************************************************************
  794. * Declaration des gadgets fenetre load
  795. ***************************************************************************
  796.  
  797. * Gadget61 (Boolean Df0) ---------------------------------------------------
  798.  
  799. gadget61    dc.l gadget62        :Gadget suivant
  800.         dc.w 24            :Position X
  801.         dc.w 15            :Position Y
  802.         dc.w 40            :Longueur Hit-Box
  803.         dc.w 9            :Hauteur Hit-Box
  804.         dc.w 0            :Flags
  805.         dc.w 1            :Activation flags
  806.         dc.w 1            :Gadget-typ       -Boolean-
  807.         dc.l border61        :Gadget-image
  808.         dc.l 0            :Select gadget
  809.         dc.l gadtext61        :Text
  810.         dc.l 0            :Exclude
  811.         dc.l 0            :Special Info
  812.         dc.w 61             :Gadget-ID
  813.         dc.l 0            :User Data
  814. border61    dc.w 0,0        :Offset
  815.         dc.b 1,1        :Couleurs
  816.         dc.b 1            :Modus
  817.         dc.b 5            :Nb coordonnees
  818.         dc.l coord61        :Coordonnes Border
  819.         dc.l 0            :Structure suivante
  820. coord61        dc.w -1,-1        :
  821.         dc.w 40,-1        :
  822.         dc.w 40,9        :Coordonnees
  823.         dc.w -1,9        :
  824.         dc.w -1,0        :
  825. gadtext61    dc.b 1,1        :Couleurs
  826.         dc.b 0            :Modus JAM1
  827.         even            :Position Parite
  828.         dc.w 0            :Position X
  829.         dc.w 1            :Position Y
  830.         dc.l 0            :Font
  831.         dc.l gad61text        :Text
  832.         dc.l 0            :Texte suivant
  833.  
  834. * Gadget62 (Boolean Df1) ---------------------------------------------------
  835.  
  836. gadget62    dc.l gadget63        :Gadget suivant
  837.         dc.w 88            :Position X
  838.         dc.w 15            :Position Y
  839.         dc.w 40            :Longueur Hit-Box
  840.         dc.w 9            :Hauteur Hit-Box
  841.         dc.w 0            :Flags
  842.         dc.w 1            :Activation flags
  843.         dc.w 1            :Gadget-typ       -Boolean-
  844.         dc.l border62        :Gadget-image
  845.         dc.l 0            :Select gadget
  846.         dc.l gadtext62        :Text
  847.         dc.l 0            :Exclude
  848.         dc.l 0            :Special Info
  849.         dc.w 62             :Gadget-ID
  850.         dc.l 0            :User Data
  851. border62    dc.w 0,0        :Offset
  852.         dc.b 1,1        :Couleurs
  853.         dc.b 1            :Modus
  854.         dc.b 5            :Nb coordonnees
  855.         dc.l coord62        :Coordonnes Border
  856.         dc.l 0            :Structure suivante
  857. coord62        dc.w -1,-1        :
  858.         dc.w 40,-1        :
  859.         dc.w 40,9        :Coordonnees
  860.         dc.w -1,9        :
  861.         dc.w -1,0        :
  862. gadtext62    dc.b 1,1        :Couleurs
  863.         dc.b 0            :Modus JAM1
  864.         even            :Position Parite
  865.         dc.w 0            :Position X
  866.         dc.w 1            :Position Y
  867.         dc.l 0            :Font
  868.         dc.l gad62text        :Text
  869.         dc.l 0            :Texte suivant
  870.  
  871. * Gadget63 (Boolean Dh0) ----------------------------------------------------
  872.  
  873. gadget63    dc.l gadget64        :Gadget suivant
  874.         dc.w 152        :Position X
  875.         dc.w 15            :Position Y
  876.         dc.w 40            :Longueur Hit-Box
  877.         dc.w 9            :Hauteur Hit-Box
  878.         dc.w 0            :Flags
  879.         dc.w 1            :Activation flags
  880.         dc.w 1            :Gadget-typ       -Boolean-
  881.         dc.l border63        :Gadget-image
  882.         dc.l 0            :Select gadget
  883.         dc.l gadtext63        :Text
  884.         dc.l 0            :Exclude
  885.         dc.l 0            :Special Info
  886.         dc.w 63             :Gadget-ID
  887.         dc.l 0            :User Data
  888. border63    dc.w 0,0        :Offset
  889.         dc.b 1,1        :Couleurs
  890.         dc.b 1            :Modus
  891.         dc.b 5            :Nb coordonnees
  892.         dc.l coord63        :Coordonnes Border
  893.         dc.l 0            :Structure suivante
  894. coord63        dc.w -1,-1        :
  895.         dc.w 40,-1        :
  896.         dc.w 40,9        :Coordonnees
  897.         dc.w -1,9        :
  898.         dc.w -1,0        :
  899. gadtext63    dc.b 1,1        :Couleurs
  900.         dc.b 0            :Modus JAM1
  901.         even            :Position Parite
  902.         dc.w 0            :Position X
  903.         dc.w 1            :Position Y
  904.         dc.l 0            :Font
  905.         dc.l gad63text        :Text
  906.         dc.l 0            :Texte suivant
  907.  
  908. * Gadget64 (Boolean Parent) -------------------------------------------------
  909.  
  910. gadget64    dc.l gadget65        :Gadget suivant
  911.         dc.w 216        :Position X
  912.         dc.w 15            :Position Y
  913.         dc.w 64            :Longueur Hit-Box
  914.         dc.w 9            :Hauteur Hit-Box
  915.         dc.w 0            :Flags
  916.         dc.w 1            :Activation flags
  917.         dc.w 1            :Gadget-typ       -Boolean-
  918.         dc.l border64        :Gadget-image
  919.         dc.l 0            :Select gadget
  920.         dc.l gadtext64        :Text
  921.         dc.l 0            :Exclude
  922.         dc.l 0            :Special Info
  923.         dc.w 64             :Gadget-ID
  924.         dc.l 0            :User Data
  925. border64    dc.w 0,0        :Offset
  926.         dc.b 1,1        :Couleurs
  927.         dc.b 0            :Modus
  928.         dc.b 5            :Nb coordonnees
  929.         dc.l coord64        :Coordonnes Border
  930.         dc.l 0            :Structure suivante
  931. coord64        dc.w -1,-1        :
  932.         dc.w 64,-1        :
  933.         dc.w 64,9        :Coordonnees
  934.         dc.w -1,9        :
  935.         dc.w -1,0        :
  936. gadtext64    dc.b 1,1        :Couleurs
  937.         dc.b 0            :Modus JAM1
  938.         even            :Position Parite
  939.         dc.w 0            :Position X
  940.         dc.w 1            :Position Y
  941.         dc.l 0            :Font
  942.         dc.l gad64text        :Text
  943.         dc.l 0            :Texte suivant
  944.  
  945. * Gadget65 (String du Drawer) ----------------------------------------------
  946.  
  947. gadget65    dc.l gadget66        :Gadget suivant
  948.         dc.w 74            :Position X
  949.         dc.w 31            :Position Y
  950.         dc.w 216        :Longueur Hit-Box
  951.         dc.w 10            :Hauteur Hit-Box
  952.         dc.w 0            :Flags
  953.         dc.w 1            :Activation flags
  954.         dc.w 4            :Gadget-typ       -String-
  955.         dc.l border65        :Gadget-image
  956.         dc.l 0            :Select gadget
  957.         dc.l gadtext65        :Text
  958.         dc.l 0            :Exclude
  959.         dc.l strinfo65        :Special Info
  960.         dc.w 65            :Gadget-ID
  961.         dc.l 0            :User Data
  962. border65    dc.w 0,0        :Offset
  963.         dc.b 1,1        :Couleurs
  964.         dc.b 0            :Modus JAM1
  965.         dc.b 5            :Nb coordonnees
  966.         dc.l coord65        :Coordonnees Border
  967.         dc.l bordere65        :Structure suivante
  968. coord65        dc.w -2,-2        :
  969.         dc.w 216,-2        :
  970.         dc.w 216,9        :Coordonnees
  971.         dc.w -2,9        :
  972.         dc.w -2,-2        :
  973. bordere65    dc.w 0,0        :Offset
  974.         dc.b 1,1        :Couleurs
  975.         dc.b 0            :Modus JAM1
  976.         dc.b 2            :Nb coordonnees
  977.         dc.l coorde65        :Coordonnees Border
  978.         dc.l 0            :Structure suivante
  979. coorde65    dc.w -69,14        :Coordonnees
  980.         dc.w 224,14        :
  981. strinfo65    dc.l filedrawer        :Pointeur sur buffer text
  982.         dc.l 0            :Pointeur sur buffer undo
  983.         dc.w 4            :Position curseur 
  984.         dc.w 39            :Nombre caracteres max
  985.         dc.w 0            :Afficher a partir posit. 0
  986.         dc.w 0,0,0,0,0        :Definitions diverses
  987.         dc.l 0            :Pointeur RastPort
  988.         dc.l 0            :Valeur du Nb saisi (Integer)
  989.         dc.l 0            :Configuration Clavier d'origine
  990. gadtext65    dc.b 1,0        :Couleurs
  991.         dc.b 0            :Modus JAM1
  992.         even            :Position Parite
  993.         dc.w -68        :Position X
  994.         dc.w 0            :Position Y
  995.         dc.l 0            :Font
  996.         dc.l gad65text        :Text
  997.         dc.l 0            :Texte suivant
  998.  
  999. * Gadget66 (Boolean Titre1) -------------------------------------------------
  1000.  
  1001. gadget66    dc.l gadget67        :Gadget suivant
  1002.         dc.w 12            :Position X
  1003.         dc.w 51            :Position Y
  1004.         dc.w 256        :Longueur Hit-Box
  1005.         dc.w 8            :Hauteur Hit-Box
  1006.         dc.w 0            :Flags
  1007.         dc.w 1            :Activation flags
  1008.         dc.w 1            :Gadget-typ       -Boolean-
  1009.         dc.l border66        :Gadget-image
  1010.         dc.l 0            :Select gadget
  1011.         dc.l 0            :Text
  1012.         dc.l 0            :Exclude
  1013.         dc.l 0            :Special Info
  1014.         dc.w 66             :Gadget-ID
  1015.         dc.l 0            :User Data
  1016. border66    dc.w 0,0        :Offset
  1017.         dc.b 1,1        :Couleurs
  1018.         dc.b 2            :Modus
  1019.         dc.b 5            :Nb coordonnees
  1020.         dc.l coord66        :Coordonnes Border
  1021.         dc.l 0            :Structure suivante
  1022. coord66        dc.w -1,-1        :
  1023.         dc.w 256,-1        :
  1024.         dc.w 256,80        :Coordonnees
  1025.         dc.w -1,80        :
  1026.         dc.w -1,0        :
  1027.  
  1028. * Gadget67 (Boolean Titre2) ------------------------------------------------
  1029.  
  1030. gadget67    dc.l gadget68        :Gadget suivant
  1031.         dc.w 12            :Position X
  1032.         dc.w 59            :Position Y
  1033.         dc.w 256        :Longueur Hit-Box
  1034.         dc.w 8            :Hauteur Hit-Box
  1035.         dc.w 0            :Flags
  1036.         dc.w 1            :Activation flags
  1037.         dc.w 1            :Gadget-typ       -Boolean-
  1038.         dc.l 0            :Gadget-image
  1039.         dc.l 0            :Select gadget
  1040.         dc.l 0            :Text
  1041.         dc.l 0            :Exclude
  1042.         dc.l 0            :Special Info
  1043.         dc.w 67            :Gadget-ID
  1044.         dc.l 0            :User Data
  1045.  
  1046. * Gadget68 (Boolean Titre3) ------------------------------------------------
  1047.  
  1048. gadget68    dc.l gadget69        :Gadget suivant
  1049.         dc.w 12            :Position X
  1050.         dc.w 67            :Position Y
  1051.         dc.w 256        :Longueur Hit-Box
  1052.         dc.w 8            :Hauteur Hit-Box
  1053.         dc.w 0            :Flags
  1054.         dc.w 1            :Activation flags
  1055.         dc.w 1            :Gadget-typ       -Boolean-
  1056.         dc.l 0            :Gadget-image
  1057.         dc.l 0            :Select gadget
  1058.         dc.l 0            :Text
  1059.         dc.l 0            :Exclude
  1060.         dc.l 0            :Special Info
  1061.         dc.w 68            :Gadget-ID
  1062.         dc.l 0            :User Data
  1063.  
  1064. * Gadget69 (Boolean Titre4) ------------------------------------------------
  1065.  
  1066. gadget69    dc.l gadget70        :Gadget suivant
  1067.         dc.w 12            :Position X
  1068.         dc.w 75            :Position Y
  1069.         dc.w 256        :Longueur Hit-Box
  1070.         dc.w 8            :Hauteur Hit-Box
  1071.         dc.w 0            :Flags
  1072.         dc.w 1            :Activation flags
  1073.         dc.w 1            :Gadget-typ       -Boolean-
  1074.         dc.l 0            :Gadget-image
  1075.         dc.l 0            :Select gadget
  1076.         dc.l 0            :Text
  1077.         dc.l 0            :Exclude
  1078.         dc.l 0            :Special Info
  1079.         dc.w 69            :Gadget-ID
  1080.         dc.l 0            :User Data
  1081.  
  1082. * Gadget70 (Boolean Titre5) ------------------------------------------------
  1083.  
  1084. gadget70    dc.l gadget71        :Gadget suivant
  1085.         dc.w 12            :Position X
  1086.         dc.w 83            :Position Y
  1087.         dc.w 256        :Longueur Hit-Box
  1088.         dc.w 8            :Hauteur Hit-Box
  1089.         dc.w 0            :Flags
  1090.         dc.w 1            :Activation flags
  1091.         dc.w 1            :Gadget-typ       -Boolean-
  1092.         dc.l 0            :Gadget-image
  1093.         dc.l 0            :Select gadget
  1094.         dc.l 0            :Text
  1095.         dc.l 0            :Exclude
  1096.         dc.l 0            :Special Info
  1097.         dc.w 70            :Gadget-ID
  1098.         dc.l 0            :User Data
  1099.  
  1100. * Gadget71 (Boolean Titre6) ------------------------------------------------
  1101.  
  1102. gadget71    dc.l gadget72        :Gadget suivant
  1103.         dc.w 12            :Position X
  1104.         dc.w 91            :Position Y
  1105.         dc.w 256        :Longueur Hit-Box
  1106.         dc.w 8            :Hauteur Hit-Box
  1107.         dc.w 0            :Flags
  1108.         dc.w 1            :Activation flags
  1109.         dc.w 1            :Gadget-typ       -Boolean-
  1110.         dc.l 0            :Gadget-image
  1111.         dc.l 0            :Select gadget
  1112.         dc.l 0            :Text
  1113.         dc.l 0            :Exclude
  1114.         dc.l 0            :Special Info
  1115.         dc.w 71            :Gadget-ID
  1116.         dc.l 0            :User Data
  1117.  
  1118. * Gadget72 (Boolean Titre7) ------------------------------------------------
  1119.  
  1120. gadget72    dc.l gadget73        :Gadget suivant
  1121.         dc.w 12            :Position X
  1122.         dc.w 99            :Position Y
  1123.         dc.w 256        :Longueur Hit-Box
  1124.         dc.w 8            :Hauteur Hit-Box
  1125.         dc.w 0            :Flags
  1126.         dc.w 1            :Activation flags
  1127.         dc.w 1            :Gadget-typ       -Boolean-
  1128.         dc.l 0            :Gadget-image
  1129.         dc.l 0            :Select gadget
  1130.         dc.l 0            :Text
  1131.         dc.l 0            :Exclude
  1132.         dc.l 0            :Special Info
  1133.         dc.w 72            :Gadget-ID
  1134.         dc.l 0            :User Data
  1135.  
  1136. * Gadget73 (Boolean Titre8) ------------------------------------------------
  1137.  
  1138. gadget73    dc.l gadget74        :Gadget suivant
  1139.         dc.w 12            :Position X
  1140.         dc.w 107        :Position Y
  1141.         dc.w 256        :Longueur Hit-Box
  1142.         dc.w 8            :Hauteur Hit-Box
  1143.         dc.w 0            :Flags
  1144.         dc.w 1            :Activation flags
  1145.         dc.w 1            :Gadget-typ       -Boolean-
  1146.         dc.l 0            :Gadget-image
  1147.         dc.l 0            :Select gadget
  1148.         dc.l 0            :Text
  1149.         dc.l 0            :Exclude
  1150.         dc.l 0            :Special Info
  1151.         dc.w 73            :Gadget-ID
  1152.         dc.l 0            :User Data
  1153.  
  1154. * Gadget74 (Boolean Titre9) ------------------------------------------------
  1155.  
  1156. gadget74    dc.l gadget75        :Gadget suivant
  1157.         dc.w 12            :Position X
  1158.         dc.w 115        :Position Y
  1159.         dc.w 256        :Longueur Hit-Box
  1160.         dc.w 8            :Hauteur Hit-Box
  1161.         dc.w 0            :Flags
  1162.         dc.w 1            :Activation flags
  1163.         dc.w 1            :Gadget-typ       -Boolean-
  1164.         dc.l 0            :Gadget-image
  1165.         dc.l 0            :Select gadget
  1166.         dc.l 0            :Text
  1167.         dc.l 0            :Exclude
  1168.         dc.l 0            :Special Info
  1169.         dc.w 74            :Gadget-ID
  1170.         dc.l 0            :User Data
  1171.  
  1172. * Gadget75 (Boolean Titre10) ------------------------------------------------
  1173.  
  1174. gadget75    dc.l gadget76        :Gadget suivant
  1175.         dc.w 12            :Position X
  1176.         dc.w 123        :Position Y
  1177.         dc.w 256        :Longueur Hit-Box
  1178.         dc.w 8            :Hauteur Hit-Box
  1179.         dc.w 0            :Flags
  1180.         dc.w 1            :Activation flags
  1181.         dc.w 1            :Gadget-typ       -Boolean-
  1182.         dc.l 0            :Gadget-image
  1183.         dc.l 0            :Select gadget
  1184.         dc.l 0            :Text
  1185.         dc.l 0            :Exclude
  1186.         dc.l 0            :Special Info
  1187.         dc.w 75            :Gadget-ID
  1188.         dc.l 0            :User Data
  1189.  
  1190. * Gadget76 (String du FileName) ---------------------------------------------
  1191.  
  1192. gadget76    dc.l gadget77        :Gadget suivant
  1193.         dc.w 76            :Position X
  1194.         dc.w 137        :Position Y
  1195.         dc.w 216        :Longueur Hit-Box
  1196.         dc.w 8            :Hauteur Hit-Box
  1197.         dc.w 0            :Flags
  1198.         dc.w 1            :Activation flags
  1199.         dc.w 4            :Gadget-typ       -String-
  1200.         dc.l border76        :Gadget-image
  1201.         dc.l 0            :Select gadget
  1202.         dc.l gadtext76        :Text
  1203.         dc.l 0            :Exclude
  1204.         dc.l strinfo76        :Special Info
  1205.         dc.w 76            :Gadget-ID
  1206.         dc.l 0            :User Data
  1207. border76    dc.w 0,0        :Offset
  1208.         dc.b 1,1        :Couleurs
  1209.         dc.b 0            :Modus JAM1
  1210.         dc.b 5            :Nb coordonnees
  1211.         dc.l coord76        :Coordonnees Border
  1212.         dc.l border76b        :Structure suivante
  1213. coord76        dc.w -1,-1        :
  1214.         dc.w 220,-1        :
  1215.         dc.w 220,8        :Coordonnees
  1216.         dc.w -1,8        :
  1217.         dc.w -1,0        :
  1218. border76b    dc.w 0,0        :Offset
  1219.         dc.b 1,1        :Couleurs
  1220.         dc.b 0            :Modus JAM1
  1221.         dc.b 2            :Nb coordonnees
  1222.         dc.l coord76b        :Coordonnees Border
  1223.         dc.l 0            :Structure suivante
  1224. coord76b    dc.w -71,13        :Coordonnees
  1225.         dc.w 222,13        :
  1226. strinfo76    dc.l filename        :Pointeur sur buffer text
  1227.         dc.l 0            :Pointeur sur buffer undo
  1228.         dc.w 0            :Position curseur 
  1229.         dc.w 33            :Nombre caracteres max
  1230.         dc.w 0            :Afficher a partir posit. 0
  1231.         dc.w 0,0,0,0,0        :Definitions diverses
  1232.         dc.l 0            :Pointeur RastPort
  1233.         dc.l 0            :Valeur du Nb saisi (Integer)
  1234.         dc.l 0            :Configuration Clavier d'origine
  1235. gadtext76    dc.b 1,1        :Couleurs
  1236.         dc.b 0            :Modus JAM1
  1237.         even            :Position Parite
  1238.         dc.w -68        :Position X
  1239.         dc.w 0            :Position Y
  1240.         dc.l 0            :Font
  1241.         dc.l gad76text        :Text
  1242.         dc.l 0            :Texte suivant
  1243.  
  1244. * Gadget77 (Boolean CANCEL) -------------------------------------------------
  1245.  
  1246. gadget77    dc.l gadget78        :Gadget suivant
  1247.         dc.w 38            :Position X
  1248.         dc.w 156        :Position Y
  1249.         dc.w 64            :Longueur Hit-Box
  1250.         dc.w 10            :Hauteur Hit-Box
  1251.         dc.w 0            :Flags
  1252.         dc.w 1            :Activation flags
  1253.         dc.w 1            :Gadget-typ       -Boolean-
  1254.         dc.l border77        :Gadget-image
  1255.         dc.l 0            :Select gadget
  1256.         dc.l gadtext77        :Text
  1257.         dc.l 0            :Exclude
  1258.         dc.l 0            :Special Info
  1259.         dc.w 77            :Gadget-ID
  1260.         dc.l 0            :User Data
  1261. gadtext77    dc.b 1,1        :Couleurs
  1262.         dc.b 0            :Modus JAM1
  1263.         even            :Position Parite
  1264.         dc.w 0            :Position X
  1265.         dc.w 1            :Position Y
  1266.         dc.l 0            :Font
  1267.         dc.l gad77text        :Text
  1268.         dc.l 0            :Texte suivant
  1269. border77    dc.w 0,0        :Offset
  1270.         dc.b 1,1        :Couleurs
  1271.         dc.b 0            :Modus JAM1
  1272.         dc.b 5            :Nb coordonnees
  1273.         dc.l coord77        :Coordonnees Border
  1274.         dc.l 0            :Structure suivante
  1275. coord77        dc.w -1,-1        :
  1276.         dc.w 64,-1        :
  1277.         dc.w 64,10        :Coordonnees
  1278.         dc.w -1,10        :
  1279.         dc.w -1,0        :
  1280.  
  1281. * Gadget78 (Boolean LOAD) ---------------------------------------------------
  1282.  
  1283. gadget78    dc.l gadget79        :Gadget suivant
  1284.         dc.w 204        :Position X
  1285.         dc.w 156        :Position Y
  1286.         dc.w 64            :Longueur Hit-Box
  1287.         dc.w 10            :Hauteur Hit-Box
  1288.         dc.w 0            :Flags
  1289.         dc.w 1            :Activation flags
  1290.         dc.w 1            :Gadget-typ       -Boolean-
  1291.         dc.l border78        :Gadget-image
  1292.         dc.l 0            :Select gadget
  1293.         dc.l gadtext78        :Text
  1294.         dc.l 0            :Exclude
  1295.         dc.l 0            :Special Info
  1296.         dc.w 78            :Gadget-ID
  1297.         dc.l 0            :User Data
  1298. gadtext78    dc.b 1,2        :Couleurs
  1299.         dc.b 0            :Modus JAM1
  1300.         even            :Position Parite
  1301.         dc.w 1            :Position X
  1302.         dc.w 1            :Position Y
  1303.         dc.l 0            :Font
  1304. gad78text    dc.l 0            :Text
  1305.         dc.l gadtext78b        :Texte suivant
  1306. border78    dc.w 0,0        :Offset
  1307.         dc.b 1,1        :Couleurs
  1308.         dc.b 1            :Modus JAM1
  1309.         dc.b 5            :Nb coordonnees
  1310.         dc.l coord78        :Coordonnees Border
  1311.         dc.l border78b        :Structure suivante
  1312. coord78        dc.w -1,-1        :
  1313.         dc.w 64,-1        :
  1314.         dc.w 64,10        :Coordonnees
  1315.         dc.w -1,10        :
  1316.         dc.w -1,0        :
  1317. border78b    dc.w 0,0        :Offset
  1318.         dc.b 1,1        :Couleurs
  1319.         dc.b 2            :Modus JAM1
  1320.         dc.b 5            :Nb coordonnees
  1321.         dc.l coord78b        :Coordonnees Border
  1322.         dc.l 0            :Structure suivante
  1323. coord78b    dc.w -140,15        :
  1324.         dc.w 88,15        :
  1325.         dc.w 88,25        :Coordonnees
  1326.         dc.w -140,25        :
  1327.         dc.w -140,16        :
  1328. gadtext78b    dc.b 3,3        :Couleurs
  1329.         dc.b 0            :Modus JAM1
  1330.         even            :Position Parite
  1331.         dc.w -204        :Position X
  1332.         dc.w 16            :Position Y
  1333.         dc.l 0            :Font
  1334.         dc.l gad78btext        :Text
  1335.         dc.l 0            :Texte suivant
  1336.  
  1337. * Gadget79 (Proportional Mover) ---------------------------------------------
  1338.  
  1339. gadget79    dc.l 0            :Gadget suivant
  1340.         dc.w 276        :Position X
  1341.         dc.w 50            :Position Y
  1342.         dc.w 20            :Largeur Hit-Box
  1343.         dc.w 82            :Hauteur Hit-Box
  1344.         dc.w 4            :Flags
  1345.         dc.w 0            :Activation flags
  1346.         dc.w 3            :Gadget-typ       -Prop-
  1347.         dc.l moverimage79    :Gadget-image
  1348.         dc.l 0            :Select gadget
  1349.         dc.l 0            :Text
  1350.         dc.l 0            :Exclude
  1351.         dc.l propinfo79        :Special Info
  1352.         dc.w 79            :Gadget-ID
  1353.         dc.l 0            :User Data
  1354. moverimage79    dc.w 0,0        :Offset
  1355.         dc.w 7            :Dimensions    
  1356. filemoversize    dc.w 3            :
  1357.         dc.w 1            :Nb bitplanes
  1358.         dc.l moverdata79    :Donnees image
  1359.         dc.b 1,1        :Couleurs
  1360.         dc.l 0            :Structure suivante
  1361. moverdata79    dc.b 0            :
  1362.         dc.b 0            :Donnees image
  1363.         dc.b 0            :-pas de donnees-
  1364.         dc.b 0            :
  1365. propinfo79    dc.w 5            :Flags -AUTOKNOB FREEVERT-
  1366.         dc.w 0            :Position x mover
  1367. filemoverpos    dc.w 0            :Position y mover
  1368.         dc.w 0            :Valeur decalage horizontal
  1369. filemoverstep    dc.w $ffff        :Valeur decalage vertical
  1370.         dc.w 0            :Largeur Box
  1371.         dc.w 0            :Hauteur Box
  1372.         dc.w 0            :Decalage absolu horizontal
  1373.         dc.w 0            :Decalage absolu vertical
  1374.         dc.w 0            :Bord gauche Box
  1375.         dc.w 0            :Bord droit Box
  1376.         even
  1377.  
  1378. * Structure pour affichage status ------------------------------------------
  1379.  
  1380. affstatus    dc.b 1,1        :Couleurs
  1381.         dc.b 0            :Modus JAM1
  1382.         even            :Position Parite
  1383.         dc.w 66            :Position X
  1384.         dc.w 172        :Position Y
  1385.         dc.l 0            :Font
  1386.         dc.l affstat        :Text
  1387.         dc.l 0            :Texte suivant
  1388. affstat        ds.l 8
  1389.  
  1390. * Structure pour affichage noms de fichier ---------------------------------
  1391.  
  1392. affnames    dc.b 1,1        :Couleurs
  1393.         dc.b 0            :Modus JAM1
  1394.         even            :Position Parite
  1395.         dc.w 12            :Position X
  1396.         dc.w 51            :Position Y
  1397.         dc.l 0            :Font
  1398.         dc.l names        :Text
  1399.         dc.l 0            :Texte suivant
  1400. names        ds.w 17
  1401.  
  1402. * Structure pour affichage noms de fichier ---------------------------------
  1403.  
  1404. afftitd        dc.b 1,1        :Couleurs
  1405.         dc.b 0            :Modus JAM1
  1406.         even            :Position Parite
  1407.         dc.w 12            :Position X
  1408.         dc.w 51            :Position Y
  1409.         dc.l 0            :Font
  1410.         dc.l affdown        :Text
  1411.         dc.l 0            :Texte suivant
  1412. affdown        ds.w 17
  1413.         
  1414. * Structure pour affichage noms de fichier ---------------------------------
  1415.  
  1416. afftitu        dc.b 1,1        :Couleurs
  1417.         dc.b 0            :Modus JAM1
  1418.         even            :Position Parite
  1419.         dc.w 12            :Position X
  1420.         dc.w 123        :Position Y
  1421.         dc.l 0            :Font
  1422.         dc.l affup        :Text
  1423.         dc.l 0            :Texte suivant
  1424. affup        ds.w 17
  1425.  
  1426. *************************************************************************
  1427. *************************************************************************
  1428.  
  1429. fileafferr1    dc.b 'No disk present - Bad drawer',0
  1430.         even
  1431. fileafferr2    dc.b 'No file specified',0
  1432.         even
  1433. fileafferr3    dc.b 'Directory truncated',0
  1434.         even
  1435. titleload    dc.b '               Load file',0
  1436.         even
  1437. titlesave    dc.b '               Save file',0
  1438.         even
  1439. titledelete    dc.b '              Delete file',0
  1440.         even
  1441. gad61text    dc.b ' df0 ',0
  1442.         even
  1443. gad62text    dc.b ' df1 ',0
  1444.         even
  1445. gad63text    dc.b ' dh0 ',0
  1446.         even
  1447. gad64text    dc.b ' Parent ',0
  1448.         even
  1449. gad65text    dc.b ' Drawer: ',0
  1450.         even
  1451. gad76text    dc.b 'Filename',0
  1452.         even
  1453. gad77text    dc.b ' Cancel ',0
  1454.         even
  1455. gadload        dc.b '  Load  ',0
  1456.         even
  1457. gadsave        dc.b '  Save  ',0
  1458.         even
  1459. gaddelete    dc.b ' Delete ',0
  1460.         even
  1461. gad78btext    dc.b ' Status ',0
  1462.         even
  1463. nofilesel    dc.b 'No file selected',$0d,$0a
  1464.         even
  1465. fileselmsg    dc.b $0d,$0a,'Fileselect V1.0 by F.Lienhardt - (info in file read.me)',$0d,$0a,$0a
  1466.         even
  1467. fisel        dc.b 'File selected : ',0
  1468.         even
  1469.  
  1470.